package com.sz.interviewpracticing.model.dto.user;

/**
 * @author hgh
 * @version 1.0.0
 *
 * @date 2024/07/23
 */
@SuppressWarnings("unused")
public class LoginUserHolder {

    public static ThreadLocal<LoginUser> threadLocal = new ThreadLocal<>();

    public static void setLoginUser(LoginUser loginUser) {
       threadLocal.set(loginUser);
    }

    public static LoginUser getLoginUser() {
        return threadLocal.get();
    }

    public static void clear() {
        threadLocal.remove();
    }
}
